package com.xilihui.xlh.business.requests;

import com.xilihui.xlh.business.entities.ItemsEntity;
import com.xilihui.xlh.business.entities.ShopEntity;
import com.xilihui.xlh.core.app.BaseEntity;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2018/6/21.
 */

interface AppointmentService {
    
    //门店列表
    @GET("/api/appoint/get_agent")
    Observable<ShopEntity> shoplist(
            @Query("access_token") String access_token,
            @Query("lng") String lng,
            @Query("lat") String lat,
            @Query("page") int page,
            @Query("keyword") String keyword,
            @Query("order") String order
    );
    
    
    //获取门店预约项目
    @FormUrlEncoded
    @POST("/api/appoint/get_project")
    Observable<ItemsEntity> items(
            @Field("id") int id
    );
    
    //提交我要预约
    @FormUrlEncoded
    @POST("/api/appoint/bespeak")
    Observable<BaseEntity> submit(
            @Field("access_token") String access_token,
            @Field("agent_id") int agent_id,
            @Field("project_id") int project_id,
            @Field("seat_set_id") int seat_type,
            @Field("start_time") long start_time,
            @Field("end_time") long end_time,
            @Field("remark") String remark
    );
    
    //立即预约-扫二维码
    @GET("api/agent/get_agent_by_id")
    Observable<ItemsEntity> lijiyuyue(
            @Query("id") int id
    );
    
    //立即预约-提交
    @FormUrlEncoded
    @POST("/api/appoint/bespeak_rightnow")
    Observable<BaseEntity> lijiyuyueSubmit(
            @Field("access_token") String access_token,
            @Field("agent_id") String agent_id,
            @Field("project_id") String project_id,
            @Field("seat_set_id") String seat_set,
            @Field("check_start_time") String check_start_time,
            @Field("remark") String remark
    );
    
    //我的预约-删除时的提示
    @FormUrlEncoded
    @POST("/api/appoint/delete_appoint_click")
    Observable<BaseEntity> hint(
            @Field("access_token") String access_token,
            @Field("id") String id
    );
    
    //点击到店取消预约
    @FormUrlEncoded
    @POST("/api/appoint/delete_appoint_store")
    Observable<BaseEntity> panduan(
            @Field("access_token") String access_token,
            @Field("id") String id
    );
    
    
    
}
